package manong.serviceimpl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import manong.beans.Kecheng;
import manong.beans.courseTable;
import manong.beans.lesson;
import manong.beans.manager;
import manong.mapper.lessonMapper;
import manong.service.lessonService;
@Service @Transactional
public class lessonImpl implements lessonService{

	@Resource
	lessonMapper lessonmapper;
	public manager login(String name, String password) {
		return lessonmapper.login(name,password);
	}
	public int add_lesson(lesson lesson) {
		
		return lessonmapper.add_lesson(lesson);
	}

	public void update_lesson(lesson lesson) {
		
		 lessonmapper.update_lesson(lesson);;
	}

	public int delete_lesson(int cno) {
		
		return lessonmapper.delete_lesson(cno);
	}


	public List<lesson> getAll_lesson() {
		
		return lessonmapper.getAll_lesson();
	}

	public lesson get_lesson(int cno) {
		
		return lessonmapper.get_lesson(cno);
	}
	@Override
	public manager get_manager(String name) {
		// TODO Auto-generated method stub
		System.out.print(name);
		return lessonmapper.get_manager(name);
	}
	@Override
	public List<Kecheng> getKecheng() {
		return lessonmapper.getKecheng();
	}
	@Override
	public List<courseTable> getCourseTable(String clase) {
		// TODO Auto-generated method stub
		return lessonmapper.getCourseTable(clase);
	}

}
